INSTALLS = /Applications/PDFPack.app ~/Applications/PDFPack.app /Library/PDF\ Services/PDFPack ~/Library/PDF\ Services/PDFPack
.PHONY: build
pkg archive: version = $(shell ./MakeUtils.rb version)

# build targets
all: build

build:
	xcodebuild -configuration Release build

run: build
	open -a PDFPack.app /Users/hiroshi/Desktop/docs/名刺.pdf 

clean:
	rm -Rf build/*
#	xcodebuild -configuration Release clean

pkg: build
	packagemaker -v --doc PDFPack.pmdoc --out build/PDFPack-$(version).pkg --version $(version)

archive: pkg
	(cd build && zip -r PDFPack-$(version).zip PDFPack-$(version).pkg)

# utility targets
lipo:
	lipo -info build/Release/pdfpack.app/Contents/MacOS/pdfpack

status:
	ls -l $(INSTALLS)

uninstall:
	rm -Rf $(INSTALLS)
